﻿<phone:PhoneApplicationPage 
    x:Class="ActivityTracker.AddNewActivity"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:ActivityTracker"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:my="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="728" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False"
    Loaded="PhoneApplicationPage_Loaded"
    local:TiltEffect.IsTiltEnabled="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="{StaticResource bipivot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="0,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Style="{StaticResource PhoneTextNormalStyle}" Foreground="White"/>
            <!--<TextBlock x:Name="PageTitle" Text="new activity" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>-->
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="80"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Grid.Row="0">
                <TextBlock Text="Activity Name"  Style="{StaticResource PhoneTextTitle2Style}" Foreground="White"/>
                <TextBlock x:Name="tblkActValidation" Text="No special chars allowed" Style="{StaticResource PhoneTextTitle3Style}" VerticalAlignment="Bottom" HorizontalAlignment="Left" Visibility="Collapsed" Foreground="White"/>
            </StackPanel>
            <TextBox x:Name="tbxNewActivity" Grid.Row="1" GotFocus="tbxNewActivity_GotFocus" Foreground="White"/>
            <TextBlock Text="Choose Image" Grid.Row="2" Style="{StaticResource PhoneTextTitle2Style}" Foreground="White"/>
            <Image x:Name="imgActivity" Grid.Row="3" MouseLeftButtonDown="imgActivity_MouseLeftButtonDown" Width="100" Height="100" Stretch="Fill" Source="/Images/ActivityImages/AddImage.png" HorizontalAlignment="Left" Margin="15,10,0,10" />
            <StackPanel Grid.Row="4" Orientation="Horizontal" Width="460">
                <TextBlock x:Name="tblkcat" Text="Choose Category" Width="240" HorizontalAlignment="Left" Style="{StaticResource PhoneTextTitle2Style}" MouseLeftButtonDown="SelectCategory_Click" local:TiltEffect.IsTiltEnabled="True" Foreground="White"/>
                <TextBlock Width="100" x:Name="tblkcatValidation" HorizontalAlignment="Center" Text="Required" Style="{StaticResource PhoneTextTitle3Style}" VerticalAlignment="Bottom" Visibility="Collapsed" Foreground="White"/>
                <Image Margin="0,0,0,0" Source="/Images/dots.png" Width="53" Height="34" HorizontalAlignment="Right" MouseLeftButtonDown="SelectCategory_Click"/>
            </StackPanel>

            <ListBox Grid.Row="5" Name="lbxCategories" VerticalAlignment="Top" Background="Lavender" BorderThickness="1" Margin="12,15,0,6" Height="140">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding catName}" Height="70" Style="{StaticResource PhoneTextTitle3Style}" FontSize="36" HorizontalAlignment="Left" Foreground="Black" VerticalAlignment="Center" FontFamily="Segoe WP SemiLight" FontWeight="Light">
                        </TextBlock>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <CheckBox Foreground="White" x:Name="cbxLocationTracking" Grid.Row="6" Content="Enable Location Tracking" local:TiltEffect.IsTiltEnabled="True" Margin="14,0,0,18"/>
            <my:AdControl Grid.Row="7" Margin="-15,0,-15,0" Height="80" HorizontalAlignment="Center" x:Name="adControl3" VerticalAlignment="Top" Width="480" ApplicationId="c8736437-6eec-403e-b9d4-333c4e6794d1" AdUnitId="28360" IsAutoRefreshEnabled="True" BorderBrush="Transparent"/>
           
        </Grid>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.save.rest.png" Text="save" Click="AppBarSave_Click"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.questionmark.rest.png" Text="help" Click="AppBarHelp_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
